#include "stdafx.h"
#include "lifesketch_2012.h"

LifeSketch_2012::LifeSketch_2012(QWidget *parent, Qt::WFlags flags)
	: QMainWindow(parent, flags)
{
	ui.setupUi(this);
	//this->sketchpads.push_back(ui.SketchPad);

	qem = QErrorMessage::qtHandler();
	//qem = new QErrorMessage(this);

	QObject::connect(
		ui.SketchPad,
		SIGNAL(newSketchStarted(SketchModel *)),
		ui.ThreeDView,
		SLOT(loadSketchModel(SketchModel *))
	);
	QObject::connect(
		ui.SketchPad,
		SIGNAL(sketchModelUpdated()),
		ui.ThreeDView,
		SLOT(updateGL())
	);

	ui.SketchPad->initSketchModel();
}

LifeSketch_2012::~LifeSketch_2012()
{

}
